<script setup>
import axios from 'axios';
import { onMounted } from 'vue';

 const getData=async()=>{
   const res=await axios.get('http://hmajax.itheima.net/api/news')
   console.log(res.data.data)
 }
 console.log(Date.now());
 
 onMounted(()=>{
   console.log(Date.now());
   getData()
 })
</script>

<template>

</template>